3.13.63 \(\int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx\) [1263]

3.13.63.1 Optimal result
3.13.63.2 Mathematica [B] (warning: unable to verify)
3.13.63.3 Rubi [A] (verified)
3.13.63.4 Maple [F]
3.13.63.5 Fricas [F]
3.13.63.6 Sympy [F]
3.13.63.7 Maxima [F]
3.13.63.8 Giac [F]
3.13.63.9 Mupad [F(-1)]

3.13.63.1 Optimal result

Integrand size = 21, antiderivative size = 492 \[ \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx=-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{e}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{e}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e} \]

output
-(a+b*arctan(c*x))^2*ln(2/(1-I*c*x))/e+1/2*(a+b*arctan(c*x))^2*ln(2*c*((-d 
)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e+1/2*(a+b*arctan(c 
*x))^2*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/e 
+I*b*(a+b*arctan(c*x))*polylog(2,1-2/(1-I*c*x))/e-1/2*I*b*(a+b*arctan(c*x) 
)*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2) 
))/e-1/2*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I 
*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/e-1/2*b^2*polylog(3,1-2/(1-I*c*x))/e+1/4*b 
^2*polylog(3,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2 
)))/e+1/4*b^2*polylog(3,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/ 
2)+I*e^(1/2)))/e
 
3.13.63.2 Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1322\) vs. \(2(492)=984\).

Time = 13.38 (sec) , antiderivative size = 1322, normalized size of antiderivative = 2.69 \[ \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx =\text {Too large to display} \]

input
Integrate[(x*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]
 
output
((8*I)*a*b*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[(c*e*x)/Sqrt[c^2*d*e]] 
 - 8*a*b*ArcTan[c*x]*Log[1 + E^((2*I)*ArcTan[c*x])] - 4*b^2*ArcTan[c*x]^2* 
Log[1 + E^((2*I)*ArcTan[c*x])] - 4*a*b*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*L 
og[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] 
+ 4*a*b*ArcTan[c*x]*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan 
[c*x]))/(c^2*d - e)] - 4*b^2*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c*x] 
*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e) 
] + 4*b^2*ArcTan[c*x]^2*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*Ar 
cTan[c*x]))/(c^2*d - e)] + 4*a*b*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Log[(-2 
*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^ 
2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] + 4*a*b*ArcTan[c*x]*Log[(-2* 
Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2 
*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] + 4*b^2*ArcSin[Sqrt[(c^2*d)/( 
c^2*d - e)]]*ArcTan[c*x]*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*( 
-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - 
e)] + 4*b^2*ArcTan[c*x]^2*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e* 
(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - 
 e)] - 4*b^2*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c*x]*Log[((2*I)*c^2* 
d - (2*I)*Sqrt[c^2*d*e] + 2*c*(-e + Sqrt[c^2*d*e])*x)/((c^2*d - e)*(I + c* 
x))] - 2*b^2*ArcTan[c*x]^2*Log[((2*I)*c^2*d - (2*I)*Sqrt[c^2*d*e] + 2*c...
 
3.13.63.3 Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 492, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {5515, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx\)

\(\Big \downarrow \) 5515

\(\displaystyle \int \left (\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}+\sqrt {e} x\right )}-\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}-\sqrt {e} x\right )}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))}{e}-\frac {\log \left (\frac {2}{1-i c x}\right ) (a+b \arctan (c x))^2}{e}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e}\)

input
Int[(x*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]
 
output
-(((a + b*ArcTan[c*x])^2*Log[2/(1 - I*c*x)])/e) + ((a + b*ArcTan[c*x])^2*L 
og[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/( 
2*e) + ((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d 
] + I*Sqrt[e])*(1 - I*c*x))])/(2*e) + (I*b*(a + b*ArcTan[c*x])*PolyLog[2, 
1 - 2/(1 - I*c*x)])/e - ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*( 
Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/e - ((I/2) 
*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqr 
t[-d] + I*Sqrt[e])*(1 - I*c*x))])/e - (b^2*PolyLog[3, 1 - 2/(1 - I*c*x)])/ 
(2*e) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I* 
Sqrt[e])*(1 - I*c*x))])/(4*e) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] + Sqrt[ 
e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(4*e)
 

3.13.63.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5515
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_)^2)^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*ArcTan[c*x] 
)^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d 
, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || 
 IntegerQ[m])
 
3.13.63.4 Maple [F]

\[\int \frac {x \left (a +b \arctan \left (c x \right )\right )^{2}}{e \,x^{2}+d}d x\]

input
int(x*(a+b*arctan(c*x))^2/(e*x^2+d),x)
 
output
int(x*(a+b*arctan(c*x))^2/(e*x^2+d),x)
 
3.13.63.5 Fricas [F]

\[ \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x}{e x^{2} + d} \,d x } \]

input
integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="fricas")
 
output
integral((b^2*x*arctan(c*x)^2 + 2*a*b*x*arctan(c*x) + a^2*x)/(e*x^2 + d), 
x)
 
3.13.63.6 Sympy [F]

\[ \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int \frac {x \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \]

input
integrate(x*(a+b*atan(c*x))**2/(e*x**2+d),x)
 
output
Integral(x*(a + b*atan(c*x))**2/(d + e*x**2), x)
 
3.13.63.7 Maxima [F]

\[ \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x}{e x^{2} + d} \,d x } \]

input
integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="maxima")
 
output
1/2*a^2*log(e*x^2 + d)/e + integrate((b^2*x*arctan(c*x)^2 + 2*a*b*x*arctan 
(c*x))/(e*x^2 + d), x)
 
3.13.63.8 Giac [F]

\[ \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x}{e x^{2} + d} \,d x } \]

input
integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="giac")
 
output
sage0*x
 
3.13.63.9 Mupad [F(-1)]

Timed out. \[ \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int \frac {x\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{e\,x^2+d} \,d x \]

input
int((x*(a + b*atan(c*x))^2)/(d + e*x^2),x)
 
output
int((x*(a + b*atan(c*x))^2)/(d + e*x^2), x)